<template lang="html">
  <div class="one-daily">
    <ul class="one-daily-container clear-fix">
      <router-link :to="'/'+item.routerId" tag='li' v-for='(item,index) in onedailyData' :key='index'>
        <div class="one-daily-content">
          <img :src="item.img" alt="">
        </div>
        <p>{{ item.title }}</p>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  name:'OneDaily',
  data(){
    return{
      onedailyData:[
        {
          img:require('../../assets/img/index/index02.gif'),
          title:'每日一测',
          routerId:'lungtest'
        },
        {
          img:require('../../assets/img/index/index03.gif'),
          title:'每日食谱',
          routerId:'dailydiet'
        }
      ]
    }
  }
}
</script>

<style lang="less" scoped>

.one-daily{
  width: 100%;
  padding: 0.4rem 0.2rem 0.3rem;
  background-color: #fff;
  box-sizing: border-box;
  margin-bottom: 1px;
  .one-daily-container{
    width: 100%;
    text-align: center;
    li{
      &:last-child{
        float: right;
      }
      &:first-child{
        float: left;
      }
      .one-daily-content{
        img{
          width: 3.25rem;
          height: 1.86rem;
          border-radius: 0.1rem;
        }
      }
      p{
        font-size: 0.14rem;
        color: #757575;
        padding-top: 0.03rem;
      }
    }
  }
}

</style>
